package com.hsmpay.common.pojo.user;

import com.hsmpay.common.util.NumberUtil;
import com.hsmpay.common.util.StringCoUtils;

import java.util.Date;

/**
 * 用户详细信息类
 * 建立时间：2012-12-13
 *
 * @author 颜铃璋
 */
public class User extends Person {
    private static final long serialVersionUID = 1L;
    public Date createDate = new Date();//创建用户对象的时间  这个时间用来判断登录是否 过期

    private Long id;
    private String loginName;//登录名(唯一)
    private String bankCard;//银行卡号(唯一 不为null)
    private String openingBank;//开户银行
    private String identityCard;//身份证
    private String nickName;//昵称
    private String password;//密码（密文）
    private String userName;//真实姓名/法人姓名
    private String email;
    private Integer roleType;//角色类型 1:普通 2:商家
    private Long terminalTypeId;//终端类型
    private Date regDate;//注册日期(取系统时间)
    private Integer active;//激活状态 1:已激活 0:未激活
    private String headerUrl;//头像地址
    private Integer clientType;//客户端类型 1网站 2安卓 3iphone 4ipad 5 大poss  6小poss
    private Integer deleted;//删除状态 1 为删除  0 未删除
    private Long roleId;//角色Id
    private String branchesBank;//开户支行
    private Integer bBankProvince;//支行 所在的省
    private Integer bBankCity;//支行 所在的市
    private Long pUserId;//父用户ID
    private String cardholder;//
    private Long organizationId;//注册时使用那个代理商的 激活码注册
    private String payPassword;//支付密码
    private String activationCode;//激活码
    private String branchesBankCode;//支行代码
    private Integer bankStatus;//绑定银行卡  状态 0:认证失败 1:认证通过 2:审核中 3:未申请认证 DEFAULT 3
    //风控 备注
    private String riskDescription;
    //三毛接口  银行代码
    private String accBankCode;

    private Double feeRate;//手续费费率
    private Double clearRate;//结算费费率 跟佣金有关
    private Double ownBrokerageRate;//佣金比例
    private Double clearFee;//结算手续费
    private Double fdMaxFee;//封顶最大手续费
    private Double fdMinFee;//封顶最小手续费
    private Long channelId;//通道ID
    private Double cashRate;//提现费率
    private Double fdFeeRate;//封顶执行费率

    private Long updateOUId;//修改时操作员id
    private Date updateTime;//修改时间
    private Integer machineType;//客户端机器类型 0 未绑定 1 简易型 2 新大陆 双卡 3 蓝牙
    private String uuId;//机器唯一ID
    private String clearMac;//结算Mac
    private Integer clearStatus;//结算状态 1 默认  2 暂停
    private String description;//描述  操作性的描述  最后一次描述
    private Integer crashT1Type;//提现类型

    private Integer isReport;//是否报备 0 未报备 1 已报备 2修改银行卡后未更新报备
    private Integer isBeta; // 是否为测试版用户

    //列表查询
    private String bankCardXing;
    
    private String merchantId;//商户号

    private String JQCusId;//进钱秒到商户号 JQCUSID
    private String JQMD5Key;//进钱秒到MD5秘钥  JQMD5KEY
    //极光推送
//    private Integer isPush;//是否推送
//    private String registration_id;//极光唯一标示
//    private String alias;//极光别名
//    private String tag;//极光标签

//    public String getTag() {
//        return tag;
//    }
//
//    public void setTag(String tag) {
//        this.tag = tag;
//    }
//
//    public Integer getIsPush() {
//        return isPush;
//    }
//
//    public void setIsPush(Integer isPush) {
//        this.isPush = isPush;
//    }
//
//    public String getRegistration_id() {
//        return registration_id;
//    }
//
//    public void setRegistration_id(String registration_id) {
//        this.registration_id = registration_id;
//    }
//
//    public String getAlias() {
//        return alias;
//    }
//
//    public void setAlias(String alias) {
//        this.alias = alias;
//    }

    public String getBankCardXing() {
        if (null == bankCardXing) {
            bankCardXing = NumberUtil.cardXing(bankCard);
        }
        return bankCardXing;
    }

    public void setBankCardXing(String bankCardXing) {
        this.bankCardXing = bankCardXing;
    }

    public String getBranchesBankCode() {
        return branchesBankCode;
    }

    public void setBranchesBankCode(String branchesBankCode) {
        this.branchesBankCode = branchesBankCode;
    }

    public String getActivationCode() {
        return activationCode;
    }

    public void setActivationCode(String activationCode) {
        this.activationCode = activationCode;
    }

    public String getCardholder() {
        return StringCoUtils.trim(cardholder);
    }

    public void setCardholder(String cardholder) {
        this.cardholder = cardholder;
    }

    public Long getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(Long organizationId) {
        this.organizationId = organizationId;
    }

    public String getPayPassword() {
        return payPassword;
    }

    public void setPayPassword(String payPassword) {
        this.payPassword = payPassword;
    }

    public Long getPUserId() {
        return pUserId;
    }

    public void setPUserId(Long userId) {
        pUserId = userId;
    }

    public String getBranchesBank() {
        return branchesBank;
    }

    public void setBranchesBank(String branchesBank) {
        this.branchesBank = branchesBank;
    }

    public Integer getBBankProvince() {
        return bBankProvince;
    }

    public void setBBankProvince(Integer bankProvince) {
        bBankProvince = bankProvince;
    }

    public Integer getBBankCity() {
        return bBankCity;
    }

    public void setBBankCity(Integer bankCity) {
        bBankCity = bankCity;
    }

    public Integer getbBankProvince() {
        return bBankProvince;
    }

    public void setbBankProvince(Integer bBankProvince) {
        this.bBankProvince = bBankProvince;
    }

    public Integer getbBankCity() {
        return bBankCity;
    }

    public void setbBankCity(Integer bBankCity) {
        this.bBankCity = bBankCity;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLoginName() {
        return StringCoUtils.trim(loginName);
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getBankCard() {
        return StringCoUtils.trim(bankCard);
    }

    public void setBankCard(String bankCard) {
        this.bankCard = bankCard;
    }

    public String getOpeningBank() {
        return openingBank;
    }

    public void setOpeningBank(String openingBank) {
        this.openingBank = openingBank;
    }

    public String getIdentityCard() {
        return StringCoUtils.trim(identityCard);
    }

    public void setIdentityCard(String identityCard) {
        this.identityCard = identityCard;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUserName() {
        return StringCoUtils.trim(userName);
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getEmail() {
        return StringCoUtils.trim(email);
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getRoleType() {
        return roleType;
    }

    public void setRoleType(Integer roleType) {
        this.roleType = roleType;
    }

    public Long getTerminalTypeId() {
        return terminalTypeId;
    }

    public void setTerminalTypeId(Long terminalTypeId) {
        this.terminalTypeId = terminalTypeId;
    }

    public Date getRegDate() {
        return regDate;
    }

    public void setRegDate(Date regDate) {
        this.regDate = regDate;
    }

    public Integer getActive() {
        return active;
    }

    public void setActive(Integer active) {
        this.active = active;
    }

    public String getHeaderUrl() {
        return headerUrl;
    }

    public void setHeaderUrl(String headerUrl) {
        this.headerUrl = headerUrl;
    }

    public Integer getClientType() {
        return clientType;
    }

    public void setClientType(Integer clientType) {
        this.clientType = clientType;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Integer getBankStatus() {
        return bankStatus;
    }

    public void setBankStatus(Integer bankStatus) {
        this.bankStatus = bankStatus;
    }

    public String getRiskDescription() {
        return riskDescription;
    }

    public void setRiskDescription(String riskDescription) {
        this.riskDescription = riskDescription;
    }

    public String getAccBankCode() {
        return accBankCode;
    }

    public void setAccBankCode(String accBankCode) {
        this.accBankCode = accBankCode;
    }

    public Double getFeeRate() {
        return feeRate;
    }

    public void setFeeRate(Double feeRate) {
        this.feeRate = feeRate;
    }

    public Double getClearRate() {
        return clearRate;
    }

    public void setClearRate(Double clearRate) {
        this.clearRate = clearRate;
    }

    public Double getOwnBrokerageRate() {
        return ownBrokerageRate;
    }

    public void setOwnBrokerageRate(Double ownBrokerageRate) {
        this.ownBrokerageRate = ownBrokerageRate;
    }

    public Double getClearFee() {
        return clearFee;
    }

    public void setClearFee(Double clearFee) {
        this.clearFee = clearFee;
    }

    public Double getFdMaxFee() {
        return fdMaxFee;
    }

    public void setFdMaxFee(Double fdMaxFee) {
        this.fdMaxFee = fdMaxFee;
    }

    public Double getFdMinFee() {
        return fdMinFee;
    }

    public void setFdMinFee(Double fdMinFee) {
        this.fdMinFee = fdMinFee;
    }

    public Long getChannelId() {
        return channelId;
    }

    public void setChannelId(Long channelId) {
        this.channelId = channelId;
    }

    public Double getCashRate() {
        return cashRate;
    }

    public void setCashRate(Double cashRate) {
        this.cashRate = cashRate;
    }

    public Double getFdFeeRate() {
        return fdFeeRate;
    }

    public void setFdFeeRate(Double fdFeeRate) {
        this.fdFeeRate = fdFeeRate;
    }

    public Long getUpdateOUId() {
        return updateOUId;
    }

    public void setUpdateOUId(Long updateOUId) {
        this.updateOUId = updateOUId;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getMachineType() {
        return machineType;
    }

    public void setMachineType(Integer machineType) {
        this.machineType = machineType;
    }

    public String getUuId() {
        return uuId;
    }

    public void setUuId(String uuId) {
        this.uuId = uuId;
    }

    public String getClearMac() {
        return clearMac;
    }

    public void setClearMac(String clearMac) {
        this.clearMac = clearMac;
    }

    public Integer getClearStatus() {
        return clearStatus;
    }

    public void setClearStatus(Integer clearStatus) {
        this.clearStatus = clearStatus;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getCrashT1Type() {
        return crashT1Type;
    }

    public void setCrashT1Type(Integer crashT1Type) {
        this.crashT1Type = crashT1Type;
    }

    public Integer getIsReport() {
        return isReport;
    }

    public void setIsReport(Integer isReport) {
        this.isReport = isReport;
    }

    public Integer getIsBeta() {
        return isBeta;
    }

    public void setIsBeta(Integer isBeta) {
        this.isBeta = isBeta;
    }

	public String getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(String merchantId) {
		this.merchantId = merchantId;
	}

    public String getJQCusId() {
        return JQCusId;
    }

    public void setJQCusId(String JQCusId) {
        this.JQCusId = JQCusId;
    }

    public String getJQMD5Key() {
        return JQMD5Key;
    }

    public void setJQMD5Key(String JQMD5Key) {
        this.JQMD5Key = JQMD5Key;
    }
}
